<html lang="zh_cn">

	<head>
		<title>HteOS - Web桌面应用框架 - 演示站点</title>
		<meta chartset="utf-8">
		<meta http-equiv="Pragma" content="no-cache">		
		<meta http-equiv="Cache-Control" content="no-store,must-revalidate">
		<meta http-equiv="expires" content="0"/>
		<meta http-equiv="content-type" content="text/html; charset=utf-8">
		<meta content="IE=edge" http-equiv="X-UA-Compatible">
		<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
		<meta name="keywords" content="HteOS,webos,WebDesktop,Web桌面,HTML5,Win8Web,Win8MetroWeb,web桌面,webdesk,webdesktop,云桌面,web云桌面，定制化桌面">
		<meta name="description" content="HteOS - 演示站点，HteOS(www.hteos.com)是一款Win8 Metro UI风格的Web桌面应用框架，现代的
	、简约的、可定制的、全新的Web桌面。HteOS具有动态磁贴、磁贴拖拽、右键菜单、快捷键、侧边栏、消息栏、
	分辨率自适应、磁贴动态排列、界面动画等组件、特性，拥有应用市场、即时通讯、图片新闻、日历、天气、股票、
	音乐FM、搜索等功能，能够满足您对现代Web桌面的要求。">
		<meta http-equiv="content-type" content="text/html;charset=utf-8" />
		<!-- 引入Bootstrap CSS 文件 -->
		<link rel="stylesheet" href="../lib/bootstrap/css/bootstrap.min.css">
		<!-- 引入HteOS 桌面 CSS 文件 -->
		<link rel="stylesheet" href="css/blue/hteos.preloader.css">
		<link rel="stylesheet" href="css/hteos.reset.css">
		<!--[if lt IE 8]>
		<script type="text/javascript">
			window.location.href="unsupport_browser.html";
		</script>
	<![endif]-->
	</head>

	<body>
		<!-- 预加载界面 -->
		<div class="hte-preloader">
			<div id="hte-preloader-panel" class="hte-preloader-panel">
				<div class="hte-preload-title">
					<img alt="" src="images/logo.png" height="30px" style="margin-top:-10px;margin-right: 10px;"> <span class="segoe">HteOS</span> - <small>与众不同的 <span
					class="segoe">Web</span>
				</small>
				</div>
				<div class="hte-preload-progress">
					<img class="hte-preloader-icon" src="images/preloader.gif"> <span class="hte-preloader-text">正在加载样式与脚本...</span>
				</div>
			</div>
		</div>
		<script type="text/javascript">
			var ctx = "";
			var panel = document.getElementById("hte-preloader-panel");
			var marginTop = ((document.body.offsetHeight - panel.offsetHeight) / 2) - 50;
			panel.style.marginTop = marginTop > 0 ? marginTop : 200;
		</script>
		<!-- 引入HteOS 公共 CSS文件 -->
		<link rel="stylesheet" href="css/blue/hteos.css" hte-theme>
		<link rel="stylesheet" href="../lib/metroicon/css/metro.icon.css">
		<link rel="stylesheet" href="../lib/fontawesome/css/font-awesome.min.css">
		<!--[if lt IE 9]>
			<script src="../lib/respond.min.js"></script>
			<script src="../lib/html5shiv.min.js"></script>
		<![endif]-->
		<!-- 引入JS文件 -->
		<script src="../lib/jquery-1.9.1.min.js"></script>
		<script src="../lib/jquery-dd.min.js"></script>
		<script src="../lib/bootstrap/js/bootstrap.min.js"></script>
		<script src="require.js" data-main="hteos"></script>
		<link rel="shortcut icon" href="images/shortcut.png">
		<script>
			function setCookie(name, value) {
				var days = 30;
				var exp = new Date();
				exp.setTime(exp.getTime() + days * 24 * 60 * 60 * 1000);
				document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString();
			}

			function getCookie(name) {
				var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
				if(arr = document.cookie.match(reg))
					return unescape(arr[2]);
				else
					return null;
			}

			var eventer = window.HteOS ? HteOS.EventManager : $(document);
			eventer.on("hteos.beforestart", function() {
				HteOS.debug = true;

				HteOS.apply(HteOS.User, {
					logon :true,
					name: "HteOS",
					face: "images/account/face/default.png"
				});

				HteOS.apply(HteOS.Settings, {
					wallpaper: "images/wallpaper.jpg",
					shortcutSize: getCookie("HTEOS-SHORTCUT-SIZE") || "small",
					mode: getCookie("HTEOS-MODE") || "metro"
				});

				if(HteOS.Settings.mode == 'desktop') {
					var containerContextMenu = HteOS.desktop.ContextMenu.containerContextMenu;
					containerContextMenu.insert({
						id: 'switch',
						icon: 'glyphicon glyphicon-th-large',
						name: '桌面样式',
						items: [{
							id: 'metro',
							name: '磁贴',
							handler: function() {
								HteOS.Messager.showLoading("", "正在切换...");
								setCookie("HTEOS-MODE", "metro");
								window.location.reload();
							}
						}, {
							id: 'desktop',
							name: '图标',
							icon: 'glyphicon glyphicon-ok'
						}]
					}, 1);
				} else {
					var containerContextMenu = HteOS.metro.ContextMenu.containerContextMenu;
					containerContextMenu.insert({
						id: 'switch',
						icon: 'glyphicon glyphicon-th-large',
						name: '桌面样式',
						items: [{
							id: 'metro',
							name: '磁贴',
							icon: 'glyphicon glyphicon-ok'
						}, {
							id: 'desktop',
							name: '图标',
							handler: function() {
								HteOS.Messager.showLoading("", "正在切换...");
								setCookie("HTEOS-MODE", "desktop");
								window.location.reload();
							}
						}]
					}, 0);
				}

				HteOS.EventManager.on("hte.dockbar.init", function() {
					var name = "图标模式"
					if(HteOS.Settings.mode == 'desktop') {
						name = "磁贴模式";
					}
					var switchMode = $("<li class=\"hte-dockbar-action\">" +
						"<span class=\"hte-dockbar-action-icon glyphicon glyphicon-th-large\"></span>" +
						"<div class=\"hte-dockbar-action-name\">" + name + "</div>" +
						"</li>");
					switchMode.appendTo($(".hte-dockbar-content"));
					switchMode.click(function() {
						HteOS.Messager.showLoading("", "正在切换...");
						if(HteOS.Settings.mode == 'desktop') {
							setCookie("HTEOS-MODE", "metro");
						} else {
							setCookie("HTEOS-MODE", "desktop");
						}
						window.location.reload();
					});
				});
				HteOS.EventManager.on("hte.desktop.shortcut.size.change", function(size) {
					setCookie("HTEOS-SHORTCUT-SIZE", size);
				});
				HteOS.EventManager.on("hte.taskbar.init", function() {

					var example = {
						"title": "示例",
						"icon": "glyphicon glyphicon-bookmark",
						"handler": function() {
							HteOS.TaskManager.start({
								id: "example",
								mode: "window",
								path: "../examples/index.html",
								name: "示例",
								icon: HteOS.basePath + "images/logo.png"
							});
						}
					}
					HteOS.Taskbar.addRightAction(example);
					var feedback = {
						title: '反馈意见',
						icon: 'glyphicon glyphicon glyphicon-edit',
						handler: function() {
							HteOS.Messager.prompt("意见反馈", "我们迫切希望得到您有价值的反馈，有您的反馈，我们会做的更好！", [{
								name: 'email',
								label: '联系方式',
								value: "${ACCOUNT.email}",
								inputType: "email"
							}, {
								name: 'content',
								label: '反馈意见',
								multiLine: true
							}], function(btn, values) {
								if(btn == 'yes') {
									if(values.content) {
										saveFeedback(values);
									}
								}
							});
						}
					};
					HteOS.Taskbar.addRightAction(feedback);
					var about = {
						title: '关于HteOS',
						icon: 'glyphicon glyphicon-info-sign',
						handler :showWelcom
					};
					HteOS.Taskbar.addRightAction(about);
				});
			});
			
			function showWelcom(){
				HteOS.Messager.alert("欢迎",HteOS.introduction);
			}
			
			eventer.on("hteos.afterstart", function() {
				/*var welcom = "<p>感谢您关注HteOS，HteOS是一个全新的Web桌面应用开发框架！</p>" +
					"<p>HteOS采用模块化开发模式，使用SASS进行CSS编译，能够快速的进行定制开发</p>" +
					"<p>如果您对HteOS有问题或者提出宝贵的意见，联系QQ：340025873</p>";*/
				//HteOS.Messager.alert("欢迎",welcom);
			});
		</script>
	</body>

</html>